package com.boot.security.server.user.mapper;

import com.boot.security.server.user.model.SysUser;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 用户
 * @author king
 */
public interface SysUserMapper extends Mapper<SysUser> {
    /**
     * 根据部门查询用户
     * @param branch
     * @return
     */
    @Select("SELECT * FROM sys_user WHERE `status` = true AND find_in_set( #{branch}, branch )")
    List<SysUser> selectByStatusAndBranch (String branch);
}